import request from '../utils/request'

export default {
    findPage({ current, size, query }) {
        return request.get('/sysResource/pageData',
            {
                current,
                size,
                ...query
            })
    },
    get(id) {
        return request.get('/sysResource/get', { id })
    },
    appTreeData(appCode) {
        return request.get('/sysResource/appTreeData', { appCode })
    },
    add(data) {
        return request.post('/sysResource/save', data)
    },
    update(data) {
        return request.post('/sysResource/update', data)
    },
    delete(id) {
        return request.get('/sysResource/delete', { id })
    },
    deleteBatch(data) {
        return request.post('/sysResource/deleteBatch', data)
    },
    enableResource(id) {
        return request.get('/sysResource/enableResource', {id})
    },
    disableResource(id) {
        return request.get('/sysResource/disableResource', {id})
    }
}